package com.fqxiny.aop01.controller;

import com.fqxiny.aop01.domain.R;
import com.fqxiny.aop01.service.impl.UserServiceImpl;
import com.fqxiny.aop01.vo.UserVo;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @author : 戚欣扬
 * @Description :
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {
    @Resource
    private  UserServiceImpl userService;
    @GetMapping("/{id}")
    public R<UserVo> getUserVoById(@PathVariable Long id){
        UserVo userVo = userService.getUserVo(id);
        return R.ok(userVo);
    }

}


